<template>
    <div class="information">
        <div :id="editorId">
            <textarea style="display:none;">### Hello Editor.md !</textarea>
        </div>
    </div>
</template>

<script>
  import $ from '$';
  import editormd from 'editormd';
  import { v4 as uuidv4 } from 'uuid';

  export default {
    name: 'information',
    data() {
      return {
        editorId: uuidv4(),
      };
    },
    async mounted() {
      await this.$nextTick();
      $(() => {
        const editor = editormd(this.editorId, {
          width: '100%',
          height: '100%',
          path: this.$EDITOR_PATH,
        });
        console.log(editor);
      });
    },
  };
</script>

<style lang="less" scoped>
    .information {

    }
</style>
